<?php

class App_Model_User_Avatar extends Ext_Db_Table
{
    public function getRowByUserId($userId)
    {
        $avatar = App_Model_DbTable_User_Avatar::getInstance()->getRowByUserId($userId);
        if(!$avatar){
            $row = array(
                'userId'  => $userId,
            );
            App_Model_DbTable_User_Avatar::getInstance()->addNew($row);
        }
        $avatar = App_Model_DbTable_User_Avatar::getInstance()->getRowByUserId($userId);
        
        return $avatar;
    }

}